function logout() {
    window.location.href = '/logout';
}

// 为当前活动的菜单项添加高亮
document.querySelectorAll('.sidebar-menu a').forEach(link => {
    link.addEventListener('click', function() {
        document.querySelector('.active')?.classList.remove('active');
        this.classList.add('active');
    });
}); 